package com.ice.dockerredis.redis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author icewinters
 */
@RestController
public class RedisController {

    @Autowired
    private RedisTemplate redisTemplate;


    @GetMapping("/count")
    public long getCountPeople(){
        Long countPeople = redisTemplate.opsForValue().increment("count_people");
        return countPeople;
    }


}
